package com.yeyks.consumer.dal.dao;

import com.yeyks.consumer.dal.domain.ShareLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;


/**
 * <p>
 * 分享记录表 Mapper 接口
 * </p>
 *
 * @author yun
 * @since 2019-06-25
 */
public interface ShareLogMapper extends BaseMapper<ShareLog> {

    int getCount(
            @Param("gmtStart") Date gmtStart,
            @Param("gmtEnd") Date gmtEnd,
            @Param("type") String type
    );

    List<Map> getCountGroupByType(
            @Param("gmtStart") Date gmtStart,
            @Param("gmtEnd") Date gmtEnd
    );

    List<Map> countGroupByDay(
            @Param("gmtStart") Date gmtStart,
            @Param("gmtEnd") Date gmtEnd);

    int deleteByPrimaryKey(Integer id);

    ShareLog selectByPrimaryKey(Integer id);

    List<ShareLog> selectAll();

    int updateByPrimaryKey(ShareLog record);
}
